﻿using System;
using Nest;

namespace Infrastructure.ElasticSearch.Models
{
    public class EsAuditField
    {
        /// <summary>
        /// 创建日期
        /// </summary>
        [Date(Format = "yyyy-MM-dd HH:mm:ss", Name = "createdDate")]
        public string CreatedDate { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

        /// <summary>
        /// 修改日期
        /// </summary>
        [Date(Format = "yyyy-MM-dd HH:mm:ss", Name = "modifiedDate")]
        public string ModifiedDate { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

        /// <summary>
        /// 创建人
        /// </summary>
        [Keyword(Name = "creator")]
        public string Creator { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Keyword(Name = "modifier")]
        public string Modifier { get; set; }
    }
}